<% if @article.errors.any? %>
    ui.dialog('<%= sanitize @article.errors.full_messages.join(', ') %>')
      .closable().show().hide(15000);
<% else %>
    ui.dialog("设置成功!").closable().show().hide(3000);
    $('#a----<%= @article.id %>')
            .find('div.category-dropdown')
            .html('<%= j render('category_dropdown', article: @article, categories: @categories) %>');
<% end %>